<!-- 顶部搜索2开始 -->
<!-- <div class="header header-mini">
    <div class="wrap cl">
	 	<img src="<{get_img_server($shop_banner)}>" width="1124px" height="90px;" /></br />
        <a href="<{$home}>" class="logo fl">
            <img src="<{get_img_server($shop_logo)}>" alt="家电汇">
        </a>
        
          <form method="post" action="<{htmlUrl(['/home/index/search','storeid'=>$shop_id])}>" class="search search-small fl">
            <div class="input-group cl">
                <input type="text" class="fl" value="" id="" name="key-words" placeholder="关键词">
                <button type="submit" class="fl">搜索</button>
            </div>
        </form>
         <{if !$member_id}>
         			<a href="<{$login}>">&nbsp;&nbsp;&nbsp;&nbsp;登录</a> | <a href="<{$register}>">注册</a>
          <{else}>
                    <h3 class="header-mini-title fl">
                    <{if $member_id}>您好，<{$member_name}>:<a href="<{$logout}>">退出</a><{/if}>
                    </h3> 
          <{/if}>
        <a href="<{$client_cart_list}>" class="btn-order-list btn-order-list-small cl">我的购物车<span class="nbadge">0</span></a>
              	欢迎来到：<{$shop_name}>旗舰店,<a href="<{$u}>" >个人中心</a> 
        </div>
</div> -->
<div class="site-nav cl">
      <div class="wrap">
<!--          <ul class="site-nav-left fl">
                <li><a href="http://www.hc360.com">慧聪网旗下平台（股票代码：HK02280）  慧聪网</a></li>
                <li class="spacer"></li>
                <li><a href="http://homea.hc360.com">慧聪家电网</a></li>
                <li class="spacer"></li>
                <li><a href="http://www.hcjdc.com">慧聪家电城</a></li>
                <li class="spacer"></li>
                <li><a href="http://www.ebook.hc360.com">慧聪商情</a></li>
            </ul> -->
           <ul class="site-nav-right fr">
           <{if !$member_id}>
               <li>
                    <a href="<{$home}>">登录</a>
               </li>
               <li>
                    <a a href="<{$register}>">注册</a>
               </li>
            <{else}>
                <li>
                    <h3><{if $member_id}>您好，<{$mobile}></h3>
               </li>
               <li>
                    ，<a href="<{$u}>" >个人中心</a>，
               </li>
               <li>
                    <a href="javascript:void(0)" id="loginout">退出</a><{/if}>
               </li>
            <{/if}>   
               <li class="spacer">

               </li>
<!--                <li>
                    <a href="#">消息通知</a>
               </li> -->
           </ul>
    </div>
</div>
<div class="header header-mini">
       <div class="wrap cl">
        <div class="sheader-ad">
        <span><{$shop_name}></span>
          <img src="<{get_img_server($shop_banner)}>" width="100%" height="90px;" />
        </div>
           <a href="<{$home}>" class="logo fl">
               <img src="<{get_img_server($shop_logo)}>" alt="家电汇">
           </a>
           <!-- <h3 class="header-mini-title fl">欢迎来到：<{$shop_name}>旗舰店,<a href="<{$u}>" >个人中心</a></h3> -->
           <div class="header-mini-right fr cl">
           <a href="<{$client_cart_list}>" class="btn-order-list btn-order-list-small fr">我的购物车<span class="nbadge">0</span></a>
            <form method="post" action="<{htmlUrl(['/home/index/search','storeid'=>$shop_id])}>" class="search search-small fl">
                <div class="input-group cl">
                    <input type="text" class="fl" value="" id="" name="keywords" placeholder="关键词">
                    <button type="submit" class="fl">搜索</button>
                    <input type="hidden" name="storeid" value="<{$shop_id}>"/>
                </div>
            </form>
          </div>
      </div>
   </div>
<script type="text/javascript" src="<{$staic_server}>asset/2.0/main/js/public.min.js"></script>
<script>
/* 

//alert弹出框
 */
    $(document).ready(function(){
    	var app = new APP();
    	var pu_alert = app.popup.alert();
    	$('#loginout').click(function(){
    	       $.ajax({
    	           type: "get",
    	           url: '<{$logout}>',
    	           data: {},
    	           dataType: "json",
    	           xhrFields: {
    	               withCredentials: true
    	           },
    	           success:function(data){
     	   			pu_alert.show({
                        title: "提示",
                        content: data.msg,
                        confirmText: '确认',
                        alert: function() {
                        var url = data.data;
                    	window.location.href = url;
                    	},
                        width: 400,
                        height: 200
                    }); 
    	           },error:function(data){
    	                 $('.nbadge').html(0);
    	           }
    	       })
    	});

    });
     window.onload=function(){
					function cart_count(){
					var shop_id = "<{$shop_id}>";
					var href = "<{$client_cart_count}>?shopId="+shop_id;
					var XHR=null; 
					if (window.XMLHttpRequest) {  
							XHR = new XMLHttpRequest();  
						} else if (window.ActiveXObject) {  
							XHR = new ActiveXObject("Microsoft.XMLHTTP");  
						} else {  
							XHR = null;  
						}
					if(XHR){
							XHR.withCredentials = true;  
							XHR.open("GET",href);
							XHR.onreadystatechange = function () {  
								if (XHR.readyState == 4 && XHR.status == 200) {
									var _res=eval("(" + XHR.responseText + ")");
									document.getElementsByClassName('nbadge')[0].innerHTML=_res.obj;
									XHR = null;  
								}  
							};  
							XHR.send();  
						} 
					}
					cart_count();
				}
</script>